<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
  <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
  <link rel='stylesheet' href='<c:url value="/css/common.css" />' type='text/css' media='all' />
  <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
  <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>

<jsp:include page="../common/header.jsp" />
    <div class="content-outer" >
     <!-- start of header content div-->
     
     <div class="content">
		<div id="content-header"> 
		  <img src="<c:url value="/images/student_details_logo.jpg" />" alt="Student_details_logo">
		  <h1>Student Details</h1>
		  <h3>View Details</h3>
		  <div id="app-back-button">							
		    <a onclick="history.back(); return false;" href="#"><img border="0" src="<c:url value="/images/buttons/back.png"/>" alt="Back"></a>
		  </div>
		</div>
		<div id="inner-tab-menu">
		  <ul>
		    <li><a href="/student/view_all">View all</a></li>
		    <li><a href="/student/advanced_search">Advanced</a></li>
		  </ul>
		</div>

<c:choose>
<c:when test="${not empty studentList || not empty success}">
<%-- <form action="${conf.TE_HOME}/tms/saveAddEntryData.htm" method="post" enctype="multipart/form-data" id="uploadExcelData" name="uploadExcelData"> --%> 
<table width="90%" border="0" style="margin-top: 25px;border:1px solid #ccc;border-collapse:collapse;cursor:default;width:90%;margin-left:1%;font-family:Verdana, Arial, Helvetica, sans-serif" cellpadding="5" cellspacing="4" >
<thead style="background-color:#eee;border-bottom:1px dotted #b9b8b8;border-right:1px dotted #ccc;text-align:right;height:25px">
<tr>
<th width="10%" align="left" valign="middle" style="border-left: 1px dotted #ccc;border-bottom:1px dotted #C6C6C6;padding-left:3px">#</th>
<th width="15%" align="left" valign="middle" style="border-left: 1px dotted #ccc;border-bottom:1px dotted #C6C6C6;padding-left:3px"><strong>Admis. No.<span style="color:#FF0000;width:36px;">*</span></strong></th>
<th width="15%" align="left" valign="middle" style="border-left: 1px dotted #ccc;border-bottom:1px dotted #C6C6C6;padding-left:3px"><strong>First Name<span style="color:#FF0000">*</span></strong></th>
<th width="15%" align="left" valign="middle" style="border-left: 1px dotted #ccc;border-bottom:1px dotted #C6C6C6;padding-left:3px"><strong>Last Name<span style="color:#FF0000">*</span></strong></th>
<th width="15%" align="left" valign="middle" style="border-left: 1px dotted #ccc;border-bottom:1px dotted #C6C6C6;padding-left:3px"><strong>Email<span style="color:#FF0000">*</span></strong></th>
<th width="15%" align="left" valign="middle" style="border-left: 1px dotted #ccc;border-bottom:1px dotted #C6C6C6;padding-left:3px"><strong>Gender<span style="color:#FF0000">*</span></strong></th>
<th width="15%" align="left" valign="middle" style="border-left: 1px dotted #ccc;border-bottom:1px dotted #C6C6C6;padding-left:3px"><strong>Roll No<span style="color:#FF0000">*</span></strong></th>
<th width="15%" align="left" valign="middle" style="border-left: 1px dotted #ccc;border-bottom:1px dotted #C6C6C6;padding-left:3px"><strong>Phone<span style="color:#FF0000">*</span></strong></th>
<th width="15%" align="left" valign="middle" style="border-left: 1px dotted #ccc;border-bottom:1px dotted #C6C6C6;padding-left:3px"><strong>Dob</strong></th>
<th></th>
<th></th>
</tr>
</thead>
<c:forEach items="${studentList}"  var="user"  varStatus="status">
<tbody>
<tr class="data1">
<td align="left" valign="middle" style="border-left: 1px dotted #ccc;border-bottom:1px dotted #C6C6C6;padding-left:3px">${status.index +1}</td>
<td align="left" valign="middle" style="border-left: 1px dotted #ccc;border-bottom:1px dotted #C6C6C6;padding-left:3px"><input type="text" name="email${status.index}" value="${user.admissionNo}" class="input150" style="width:36px;"></td>
<td align="left" valign="middle" style="border-left: 1px dotted #ccc;border-bottom:1px dotted #C6C6C6;padding-left:3px"><input type="text" name="lName${status.index}" value="${user.userDisplayNameFirst}" class="input150" style="width:80px;"></td>
<td align="left" valign="middle" style="border-left: 1px dotted #ccc;border-bottom:1px dotted #C6C6C6;padding-left:3px"><input type="text" name="email${status.index}" value="${user.userDisplayNameLast}" class="input150" style="width:65px;"></td>
<td align="left" valign="middle" style="border-left: 1px dotted #ccc;border-bottom:1px dotted #C6C6C6;padding-left:3px"><input type="text" name="email${status.index}" value="${user.emailId}" class="input150" style="width:150px;"></td>
<td align="left" valign="middle" style="border-left: 1px dotted #ccc;border-bottom:1px dotted #C6C6C6;padding-left:3px"><input type="text" name="email${status.index}" value="${user.gender}" class="input150" style="width:40px;"></td>
<td align="left" valign="middle" style="border-left: 1px dotted #ccc;border-bottom:1px dotted #C6C6C6;padding-left:3px"><input type="text" name="fName${status.index}" value="${user.classRollNo}" class="input150" style="width:40px;"></td>
<td align="left" valign="middle" style="border-left: 1px dotted #ccc;border-bottom:1px dotted #C6C6C6;padding-left:3px"><input type="text" name="email${status.index}" value="${user.phone}" class="input150" style="width:120px;"></td>
<td align="left" valign="middle" style="border-left: 1px dotted #ccc;border-bottom:1px dotted #C6C6C6;padding-left:3px"><input type="text" name="gender${status.index}" value="${user.dob}" class="input150" style="width:65px;text-align:center"></td>
<%--<td align="left" valign="middle" style="border-left: 1px dotted #ccc;border-bottom:1px dotted #C6C6C6;padding-left:3px">
 <c:choose>
<c:when test="${not empty user.message && user.message == 'alreadyExists' }"><span style='color:blue;font-style: italic;'>User Exists Already. </span></c:when>
<c:when test="${not empty user.message && user.message == 'invalidEmail' }"><span style='color:red;'>Invalid Email ID</span></c:when>
<c:when test="${not empty user.message && user.message == 'invalidExpiryDate' }"><span style='color:red;'>Invalid Expiry Date</span></c:when>
<c:when test="${not empty user.message && user.message == 'invalidDOB' }"><span style='color:red;'>Invalid DOB</span></c:when>
<c:when test="${not empty user.message && user.message == 'underAge' }"><span style='color:red;'>Age should be more than 13 Years</span></c:when>
<c:when test="${not empty user.message && user.message == 'unknownError' }"><span style='color:red;'>Unknown Error</span></c:when>
<c:when test="${not empty user.message && user.message == 'firstNameRequired' }"><span style='color:red;'>First Name is required</span></c:when>
<c:when test="${not empty user.message && user.message == 'lastNameRequired' }"><span style='color:red;'>Last Name is required</span></c:when>
<c:when test="${not empty user.message && user.message == 'genderRequired' }"><span style='color:red;'>Gender is required</span></c:when>
<c:when test="${not empty user.duplicateOf}"><span style='color:red;'>Duplicate of #${user.duplicateOf}</span></c:when>
<c:otherwise><span style='color:green;'><strong>OK</strong></span></c:otherwise>
</c:choose> 
</td>--%>

</tr>	
</tbody>	
</c:forEach>
</table>
<!-- </form> -->
</c:when>
<c:otherwise>
<c:choose>
<c:when test="${not empty excelUploadError && excelUploadError == true}">
<div style="height:15px;width:98%;padding:5px;margin-top:10px;margin-bottom:10px;border:1px dotted #ccc;font-size:13px"><strong>Please add the double excel properly.</strong></div>
</c:when>
<c:otherwise>
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-top:60px">
<tr>
<td align="center">
<div style="width:75%;padding:4px;border:1px dotted #ccc;">
<img src="${cdnPath}/images/courtmgm/Warning.png" border="0" style="vertical-align:middle" alt="Warning" />&nbsp;<span style="font-size:18px;color:#FF0000">Kindly verify the uploaded Excel sheet.</span> <br /><br />
<form action="${conf.TE_HOME}/tms/addEntry/upload.htm" method="post" enctype="multipart/form-data"> 
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td width="62%" valign="top">Re-upload the Excel sheet containing the basic information of players:</td>
<td valign="top"><input type="file" name="file" id="users" />
<input type="submit" value="Go" style="cursor: pointer;" class="buttonBtn blueBtn smallBtn"></td>
</tr>
<tr>
<td valign="top" style="border-top:1px solid #ccc" colspan="2" align="center"><a href="${conf.TE_HOME}/tms/templates/Tournament_Singles_Upload_Template.xls" style="text-decoration:underline"><strong>Click here</strong></a> to download a demo file for the appropriate template format.</td>
</tr>						   
</table>
</form>
</div>
</td>
</tr>
</table>
</c:otherwise>
</c:choose>
</c:otherwise>
</c:choose>
      </div>
            </div>
<jsp:include page="../common/footer.jsp" /> 

</body>
</html>